#coding:utf-8
from django.conf.urls import patterns


urlpatterns = patterns('lovewith.share.views',
    (r'^cate/(?P<cate_id>\d+)/', 'share.get_share_by_cate'),
    (r'^goods/all/(?P<page_no>\d+)?', 'goods.get_goods'),
    (r'^goods/cate/(?P<cate_id>\d+)/(?P<page_no>\d+)?', 'goods.get_goods_by_cate'),
    (r'^goods/(?P<tag>[\w\"]+)/(?P<page_no>\d+)?', 'goods.get_goods'),
    #所有商家的帖子(运营用)
    (r'^business/all/', 'share.get_all_business_share'),

    (r'^search/color/(?P<color>\w+)', 'share.get_share_by_color'),
    (r'^search/tag/(?P<tag>[\w\"]+)', 'share.get_share_by_tag'),
    (r'^search/keyword/(?P<keyword>.*)', 'share.get_share_by_keyword'),

    #单独的图片页貌似暂时用不着
    #(r'^detail/(?P<share_id>\d+)/', 'detail.get_single_detail'),
    (r'^detail/all/(?P<share_id>\d+)/', 'detail.get_full_detail'),
    #分享到微信
    (r'^detail/weixin/', 'detail.share_to_weixin'),

    (r'^post/image/$', 'post.add_share'),
    (r'^post/video/$', 'post.add_video'),
    (r'^edit/(?P<share_id>\d+)', 'post.edit_share'),

    #类目&&颜色数据
    (r'^ajax/g/cate_tag_and_color/$', 'ajax.get_cate_and_color_data'),

    #like相关
    (r'^ajax/g/like_state/', 'ajax.get_like_num'),
    (r'^ajax/g/addlike/', 'ajax.add_like'),
    (r'^ajax/g/removelike/', 'ajax.remove_like'),
    #删除分享
    (r'^ajax/g/delete/$', 'ajax.delete'),
    #获取分享数据的ajax接口
    (r'^ajax/g/share/', 'ajax.get_share_page_data'),

    #用于标注的预定义用户角色
    (r'^ajax/g/mark_user_role/', 'ajax.get_maker_user_role'),
    #用于标注的预定义商品标签
    (r'^ajax/g/mark_goods_tag/', 'ajax.get_maker_goods_tags'),

    #获取商品数据的ajax接口
    (r'^ajax/g/goods/', 'ajax.get_goods_page_data'),

    #获取评论
    (r'^ajax/get_comment/', 'ajax.get_comment'),
    #添加评论
    (r'^ajax/add_comment/', 'ajax.add_comment'),
    #添加评论
    (r'^ajax/delete_comment/', 'ajax.delete_comment'),
    #推荐&&取消推荐
    (r'^ajax/recommend/', 'ajax.update_recommend'),
    #增加打标来源
    (r'^ajax/p/add_origin', 'ajax.add_origin_marker'),
    (r'^ajax/p/addtkflag', 'ajax.add_goods_marker'),
    (r'^ajax/p/upload$', 'ajax.upload_image'),

    #获取用户like&&album数量
    (r'^ajax/g/user_nav_data/', 'ajax.get_user_nav_data'),

    #微博linkcard接口
    (r'^ajax/g/wb/linkcard', 'ajax.wb_link_card'),

    #联想标签
    (r'^ajax/p/preset_tag/', 'ajax.get_preset_tag'),

    #获取图片服务类型
    (r'^ajax/g/attach_service_type/', 'ajax.get_image_service_type'),
    #更新图片服务类型
    (r'^ajax/p/update_attach_service_type/', 'ajax.update_attach_service_type'),

    #获取图片附加数据
    (r'^ajax/g/attach_ext_data/', 'ajax.get_attach_ext_data'),

    #浏览量统计
    (r'^ajax/g/share_analytics/', 'ajax.add_share_analytics_data'),

    #保存采集图片
    (r'^ajax/g/save_collect_image/', 'ajax.save_collect_image'),

    #RSS
    (r'^rss.xml$', 'feed.get_feeds'),
)
